package com.itlong.cloud.POJO.PO;

import com.itlong.cloud.annotation.ItlField;
import com.itlong.cloud.annotation.ItlTables;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * <desc>
 *      App用户房间信息实体类。
 * </desc>
 * @createDate 2017/09/18
 */
@ItlTables("app_user_room")
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class AppUserRoomPO extends BasePO implements Serializable{
    @ItlField("user_id")
    private String userId;      //用户id
    @ItlField("project_id")
    private String projectId;   //项目id
    @ItlField("build_id")
    private String buildId;     //楼栋号
    @ItlField("unit_id")
    private String unitId;      //单元号
    @ItlField("room_id")
    private String roomId;      //房间Id
    @ItlField("room_num")
    private String roomNum;     //房间编号
    @ItlField("user_room_status")
    private Integer userRoomStatus;     //用户房间状态：1待审核 2迁入 3迁出 4未通过
    @ItlField("houser_type")
    private Integer houserType;      //住户身份：1业主本人 2亲属 3租客(云半径多场景适配项目后此字段修改为自定义)
    @ItlField("sort_num")
    private Integer sortNum;     //顺序号
    @ItlField("qq_num")
    private String qqNum;       //QQ号
    @ItlField("tiny_id")
    private String tinyId;      //QQ物联身份
    @ItlField("home_phone")
    private String homePhone;   //座机号
    @ItlField("open_pwd")
    private String openPwd;     //开门密码
    @ItlField("source")
    private Integer source;     //用户的房间来源:1邀请 2注册 3管理员添加 4一卡通
    @ItlField("would_call_qq")
    private Integer wouldCallQq;    //QQ能否被呼叫：0否 1是

    @ItlField("auth_user_id")
    private String authUserId;      //授权人用户id

    public AppUserRoomPO(String userId, String projectId, String qqNum) {
        this.userId = userId;
        this.projectId = projectId;
        this.qqNum = qqNum;
    }

    /**
     *  <desc>
     *       APP端申请房屋认证
     *  </desc>
     * @param userId
     * @param projectId
     * @param buildId
     * @param unitId
     * @param roomNum
     * @param roomId
     * @param userRoomStatus
     * @param houserType
     * @param source
     */
    public  AppUserRoomPO(String userId,String projectId,String buildId,String unitId,String roomNum,String roomId,
                          Integer userRoomStatus,Integer houserType,Integer source,Integer status,Date createTime){
        this.userId = userId;
        this.projectId = projectId;
        this.buildId = buildId;
        this.unitId = unitId;
        this.roomNum = roomNum;
        this.roomId = roomId;
        this.userRoomStatus = userRoomStatus;
        this.houserType = houserType;
        this.source = source;
        super.setStatus(status);
        super.setCreateTime(createTime);
    }

    /**
     *  <desc>
     *       APP端申请房屋认证
     *  </desc>
     * @param userId
     * @param projectId
     * @param buildId
     * @param unitId
     * @param roomNum
     * @param roomId
     * @param userRoomStatus
     * @param houserType
     * @param source
     * @param openPwd 开门密码
     */
    public  AppUserRoomPO(String userId,String projectId,String buildId,String unitId,String roomNum,String roomId,
                          Integer userRoomStatus,Integer houserType,Integer source,Integer status,Date createTime,String openPwd){
        this.userId = userId;
        this.projectId = projectId;
        this.buildId = buildId;
        this.unitId = unitId;
        this.roomNum = roomNum;
        this.roomId = roomId;
        this.userRoomStatus = userRoomStatus;
        this.houserType = houserType;
        this.source = source;
        super.setStatus(status);
        super.setCreateTime(createTime);
        this.setOpenPwd(openPwd);
    }


}
